<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center myDistribution_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub myDistribution_fd0_0'>
					<view class='flex flex-wrap align-center myDistribution_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  myDistribution_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='myDistribution_fd0_0_c1'>我的分销</text>
					<view class='flex flex-wrap align-center justify-end myDistribution_fd0_0_c0'>
						<!-- <text class='myDistribution_fd0_0_c2_c0'>提现账户</text> -->
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout myDistribution_flex_1">
				<view class='flex flex-direction align-stretch myDistribution_fd1_0'>
					<view class='flex flex-wrap align-center flex-sub myDistribution_fd1_0_c0'>
						<image class='myDistribution_fd1_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"378.png"'></image>
						<text class='myDistribution_fd1_0_c0_c1'>待提现收益(元)</text>
						<view class='flex flex-wrap align-center myDistribution_fd1_0_c0_c2' @tap="handleJumpDiy"
							data-type="navigateTo"
							:data-url="`/pages/qbgl/immediateWithdrawal/immediateWithdrawal?is_apply=1`">
							<image class='myDistribution_fd1_0_c0_c2_c0' mode="aspectFit" :src='STATIC_URL+"18.png"'>
							</image>
							<text class='myDistribution_fd1_0_c0_c2_c1'>提现</text>
						</view>
					</view>
					<text class='flex-wrap align-center myDistribution_fd1_0_c1'>
						<text>{{ distributionData.leijishouyi | frontPrice }}</text>
						<text>{{ distributionData.leijishouyi | laterPrice }}</text>
					</text>
				</view>
				<view class='flex align-center justify-between myDistribution_fd1_1'>
					<view class='flex flex-direction flex-wrap align-center'>
						<text class='myDistribution_fd1_1_c0_c0'>今日返佣(¥)</text>
						<text class='flex-wrap align-center myDistribution_fd1_1_c0_c1'>
							<text>{{ distributionData.day_money | frontPrice }}</text>
							<text>{{ distributionData.day_money | laterPrice }}</text>
						</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center'>
						<text class='myDistribution_fd1_1_c0_c0'>本月返佣(¥)</text>
						<text class='flex-wrap align-center myDistribution_fd1_1_c0_c1'>
							<text>{{ distributionData.month_money | frontPrice }}</text>
							<text
								class=' myDistribution_price2_fd1_1_c1_c1'>{{ distributionData.month_money | laterPrice }}</text>
						</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center'>
						<text class='myDistribution_fd1_1_c0_c0'>上月返佣(¥)</text>
						<text class='flex-wrap align-center myDistribution_fd1_1_c0_c1'>
							<text>{{ distributionData.last_month_money | frontPrice }}</text>
							<text>{{ distributionData.last_month_money | laterPrice }}</text>
						</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center myDistribution_fd1_2'>
					<text class='myDistribution_fd1_2_c0'>我的邀请：</text>
					<text class='myDistribution_fd1_2_c0'>{{distributionData.last_count}}</text>
					<text class='myDistribution_fd1_2_c0'>人</text>
					<text class='myDistribution_fd1_2_c3' @tap="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/promoter/promoter`">查看详情</text>
					<image class='myDistribution_fd1_2_c4' mode="aspectFit" :src='STATIC_URL+"350.png"'></image>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myDistribution_flex_2">
				<view class='flex flex-wrap align-center'>
					<view class='flex flex-wrap align-center myDistribution_fd2_0_c0'>
					</view>
					<text class='myDistribution_fd2_0_c1'>近30天记录</text>
					<text class='myDistribution_fd2_0_c2' @tap="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/incomeDetailed/incomeDetailed`">查看全部</text>
					<image class='myDistribution_fd2_0_c3' mode="aspectFit" :src='STATIC_URL+"351.png"'></image>
				</view>
				<template v-for='(item,key0) in distributionDetails'>
					<view class='flex flex-direction flex-wrap align-stretch myDistribution_fd2_1' :key='key0'>
						<view class='flex flex-wrap align-start'>
							<text class='myDistribution_fd2_1_c0_c0'>{{item.remark}}</text>
							<text class='myDistribution_fd2_1_c0_c1'></text>
							<text class=' myDistribution_fd2_1_c0_c2001' v-if="item.money_type == '2'">
								<text>{{item.change_money}}</text>
							</text>
							<text class=' myDistribution_fd2_1_c0_c2' v-else>
								<text>{{item.change_money}}</text>
							</text>
						</view>
						<text class='myDistribution_fd2_1_c1'>{{item.create_time}}</text>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"distributionData": {
					"id": "",
					"huiyuanyue": "",
					"leijishouyi": "",
					"month_money": "",
					"last_month_money": "",
					"day_money": "",
					"last_count": ""
				},
				"distributionDetails": [],
				"is_apply": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				is_apply
			} = options
			if (is_apply !== undefined) this.is_apply = is_apply
			this.getDistributionFunc()
			this.getDistributionDetailsFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取分销信息
			async getDistributionFunc() {
				//请求方法
				//数据验证

				let datadistributionData = await this.$api.get(global.apiUrls.post63b7cb4a57224, {

				});

				if (datadistributionData.data.code != 1) {
					this.$message.info(datadistributionData.data.msg);
					return
				}
				let infodistributionData = datadistributionData.data;
				this.distributionData = infodistributionData.data

			},
			//分销中心-分销明细
			getDistributionDetailsFunc() {
				this.minixPagingListsApi = global.apiUrls.post64e09c6e03ab3;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					money_type: '0'
				}
				this.listData = [];
				this.distributionDetails = this.listData;
				this.pagingListToggle();

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(255, 255, 255, 1);
		background-size: 100% auto;
	}

	.myDistribution_flex_0 {
		background: rgba(255, 255, 255, 1);
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.myDistribution_fd0_0_c2_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
	}

	.myDistribution_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: rgba(51, 51, 51, 1);
	}

	.myDistribution_fd0_0_c0_c0 {
		font-size: 32rpx;
		color: rgba(51, 51, 51, 1);
	}

	.myDistribution_fd0_0_c0 {
		width: 160rpx;
		height: 88rpx;
	}

	.myDistribution_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.myDistribution_flex_1 {
		background: var(--benbenbgColor2);
		margin: 20rpx 32rpx 0rpx 32rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 0rpx 0rpx 0rpx 0rpx;
	}

	.myDistribution_fd1_2_c4 {
		width: 10rpx;
		height: 18rpx;
		margin: 0rpx 0rpx 0rpx 8rpx;
	}

	.myDistribution_fd1_2_c3 {
		color: #FFFFFF;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.myDistribution_fd1_2_c0 {
		color: #FFFFFF;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.myDistribution_fd1_2 {
		background: var(--benbenbgColor2);
		background-size: 100% auto;
		padding: 32rpx 32rpx 32rpx 40rpx;
		border-radius: 0rpx 0rpx 16rpx 16rpx;
	}

	.myDistribution_price2_fd1_1_c1_c1 {
		line-height: 40rpx;
	}

	.myDistribution_fd1_1_c0_c1 {
		font-size: 32rpx;
		font-weight: 700;
		color: #FFFFFF;
		line-height: 40rpx;
	}

	.myDistribution_fd1_1_c0_c0 {
		font-size: 24rpx;
		font-weight: 500;
		color: #FFFFFF;
		margin: 0rpx 0rpx 24rpx 0rpx;
		line-height: 33rpx;
	}

	.myDistribution_fd1_1 {
		margin: 40rpx 48rpx 32rpx 48rpx;
	}

	.myDistribution_fd1_0_c1 {
		line-height: 57rpx;
		font-size: 48rpx;
		font-weight: 700;
		color: #FFFFFF;
	}

	.myDistribution_fd1_0_c0_c2_c1 {
		color: #FFFFFF;
		font-size: 24rpx;
		font-weight: 500;
		line-height: 33rpx;
		margin: 0rpx 0rpx 0rpx 12rpx;
	}

	.myDistribution_fd1_0_c0_c2_c0 {
		width: 24rpx;
		height: 24rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.myDistribution_fd1_0_c0_c2 {
		border: 1px solid rgba(255, 255, 255, 1);
		padding: 0rpx 46rpx 0rpx 46rpx;
		height: 56rpx;
		line-height: 56rpx;
		border-radius: 28rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.myDistribution_fd1_0_c0_c1 {
		color: #FFFFFF;
		font-size: 28rpx;
		font-weight: 500;
		line-height: 40rpx;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.myDistribution_fd1_0_c0_c0 {
		width: 32rpx;
		height: 30rpx;
	}

	.myDistribution_fd1_0_c0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.myDistribution_fd1_0 {
		border-bottom: 1px solid rgba(255, 255, 255, 0.2);
		padding: 32rpx 32rpx 32rpx 32rpx;
		margin: 0rpx 24rpx 0rpx 24rpx;
	}

	.myDistribution_flex_2 {
		padding: 32rpx 32rpx 0rpx 32rpx;
	}

	.myDistribution_fd2_1_c1 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.myDistribution_fd2_1_c0_c2 {
		color: #FF5050;
		font-weight: 700;
		line-height: 40rpx;
		font-size: 32rpx;
	}

	.myDistribution_fd2_1_c0_c2001 {
		color: #333;
		font-weight: 700;
		line-height: 40rpx;
		font-size: 32rpx;
	}

	.myDistribution_fd2_1_c0_c1 {
		color: #FF5050;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 40rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.myDistribution_fd2_1_c0_c0 {
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		max-width: 529rpx;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		color: #333;
	}

	.myDistribution_fd2_1 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.myDistribution_fd2_0_c3 {
		width: 10rpx;
		height: 18rpx;
		margin: 0rpx 0rpx 0rpx 8rpx;
	}

	.myDistribution_fd2_0_c2 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
		margin: 0rpx 8rpx 0rpx auto;
	}

	.myDistribution_fd2_0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 45rpx;
	}

	.myDistribution_fd2_0_c0 {
		background: var(--benbenbgColor2);
		width: 8rpx;
		height: 34rpx;
		border-radius: 4rpx;
		background-size: 100% auto;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}
</style>